<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<style>
    #photos {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .photos-grid {
        width: 100%;
    }



    .photos-grid-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 1;
    }
</style>
<?php if (equipment() == 1) : ?>
    <style>
        .photos-grid-item {
            border: 1px solid white;
            height: 135px;
        }
    </style>
<?php else : ?>
    <style>
        .photos-grid-item {
            border: 1px solid white;
            height: 200px;
        }
    </style>
<?php endif; ?>
<div class="banner">
    <div class="banner-wrapper">
        <a style="background-image:url('https://blog.satri.cn/usr/uploads/photo-bg.jpg')">
            <h2>个人相册
                <br>
                <p style="font-size:15px;letter-spacing:1px;">白驹过涧</p>
            </h2>
        </a>
    </div>
</div>
<div class="main">
    <div class="photo">
        <?php if ($this->have()) : ?>
            <div id="photos">
                <?php while ($this->next()) : ?>
                    <div class="photos-grid">
                        <div class="photos-grid-item">
                            <img src="<?php $this->attachments(1)->attachment->url(); ?>">
                        </div>
                    </div>

                <?php endwhile; ?>
            </div>
        <?php endif; ?>
    </div>
</div>

<?php $this->pageNav('&laquo; 前一页', '后一页 &raquo;'); ?>
</div><!-- end #main -->
<?php $this->need('footer.php'); ?>